package com.cswangdao.mapper;

import com.cswangdao.domain.dto.AdPageDTO;
import com.cswangdao.domain.model.MarketAd;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MarketAdMapper {

    Page<MarketAd> pageQueryInfo(AdPageDTO pageDTO);

    void addAd(MarketAd ad);

    void updateById(MarketAd ad);

    @Delete(("delete from market_ad where id = #{id} "))
    void deleteById(Integer id);

    List<MarketAd> getAll();
}